public class SolutionOffer64 {
    public int sumNums(int n) {
        return n==1?1:n+sumNums(n-1);
    }

    public static void main(String[] args) {
        System.out.println(new SolutionOffer64().sumNums(9));
    }
}
